﻿namespace FFF.Test.Entity.Framework.Entity
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using System.ComponentModel.DataAnnotations.Schema;
    using System.Text;
    using Abp.Domain.Entities;

    /// <summary>
    /// Entity的基类
    /// </summary>
    /// <typeparam name="TPrimaryKey">entity的主键的类型</typeparam>
    public abstract class BaseEntity<TPrimaryKey> : Entity<TPrimaryKey>
    {
        /// <summary>
        /// 租户的GUID
        /// </summary>
        [Column("TenantId")]
        [Display(Name = "租户的GUID", Description = "租户的GUID")]
        public virtual Guid? TenantId { get; set; }

        /// <summary>
        /// 是否删除
        /// </summary>
        [Column("IsDeleted")]
        [Display(Name = "是否删除", Description = "是否删除")]
        public virtual byte IsDeleted { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Column("CreateTime")]
        [Display(Name = "创建时间", Description = "创建时间")]
        public virtual DateTime? CreateTime { get; set; }

        /// <summary>
        /// 创建人GUID
        /// </summary>
        [Column("CreateGUID")]
        [Display(Name = "创建人GUID", Description = "创建人GUID")]
        public virtual Guid? CreateGUID { get; set; }

        /// <summary>
        /// 创建人名称
        /// </summary>
        [Column("CreatedName")]
        [Display(Name = "创建人名称", Description = "创建人名称")]
        [StringLength(128)]
        public virtual string CreatedName { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        [Column("ModifiedTime")]
        [Display(Name = "修改时间", Description = "修改时间")]
        public virtual DateTime? ModifiedTime { get; set; }

        /// <summary>
        /// 修改人GUID
        /// </summary>
        [Column("ModifiedGUID")]
        [Display(Name = "修改人GUID", Description = "修改人GUID")]
        public virtual Guid? ModifiedGUID { get; set; }

        /// <summary>
        /// 创建人名称
        /// </summary>
        [Column("ModifiedName")]
        [Display(Name = "修改人名称", Description = "修改人名称")]
        [StringLength(128)]
        public virtual string ModifiedName { get; set; }

        /// <summary>
        /// 审核状态
        /// </summary>
        [Column("ApproveState")]
        [Display(Name = "审核状态", Description = "审核状态")]
        [StringLength(16)]
        public virtual string ApproveState { get; set; }

        /// <summary>
        /// 审核人GUID
        /// </summary>
        [Column("ApproveGUID")]
        [Display(Name = "审核人GUID", Description = "审核人GUID")]
        public virtual Guid? ApproveGUID { get; set; }

        /// <summary>
        /// 审核时间
        /// </summary>
        [Column("ApproveTime")]
        [Display(Name = "审核时间", Description = "审核时间")]
        public virtual DateTime? ApproveTime { get; set; }

        /// <summary>
        /// 公司GUID
        /// </summary>
        [Column("BuUnitGUID")]
        [Display(Name = "公司GUID", Description = "公司GUID")]
        public virtual Guid? BuUnitGUID { get; set; }

        /// <summary>
        /// 新增的时候系统的备注
        /// </summary>
        [Column("CreateDesc")]
        [Display(Name = "新增的时候系统的备注", Description = "新增的时候系统的备注")]
        [StringLength(16)]
        public virtual string CreateDesc { get; set; }

        /// <summary>
        /// 编辑的时候系统的备注
        /// </summary>
        [Column("ModifiedDesc")]
        [Display(Name = "新增的时候系统的备注", Description = "新增的时候系统的备注")]
        [StringLength(16)]
        public virtual string ModifiedDesc { get; set; }
    }
}
